package com.foreknow.elm.service;

import com.foreknow.elm.po.Deliveryaddress;

import java.sql.SQLException;
import java.util.List;

/**
 * @author shkstart
 * @create 2021-08-27 10:14
 */
public interface DeliveryaddressService {
    /**
     * DeliveryAddressController/listDeliveryAddressByUserId
     *    参数：userId
     *    返回值：deliveryAddress数组
     *    功能：根据用户编号查询所属送货地址
     */
    public List<Deliveryaddress> listDeliveryAddressByUserId(String userId);


    /**
     * DeliveryAddressController/getDeliveryAddressById
     *    参数：daId
     *    返回值：deliveryAddress对象
     *    功能：根据送货地址编号查询送货地址
     */
    public Deliveryaddress getDeliveryAddressById(int daId);

    /**
     *  DeliveryAddressController/saveDeliveryAddress
     *    参数：contactName、contactSex、contactTel、address、userId
     *    返回值：int（影响的行数）
     *    功能：向送货地址表中添加一条记录
     */
    public int saveDeliveryAddress(String contactName ,int contactSex,String contactTel ,String address ,String userId);


    /**
     *  DeliveryAddressController/updateDeliveryAddress
     *    参数：daId、contactName、contactSex、contactTel、address、userId
     *    返回值：int（影响的行数）
     *    功能：根据送货地址编号更新送货地址信息
     */
    public  int updateDeliveryAddress(int daId ,String contactName,int  contactSex ,String contactTel ,String address,String userId);


    /**
     * DeliveryAddressController/removeDeliveryAddress
     *    参数：daId
     *    返回值：int（影响的行数）
     *    功能：根据送货地址编号删除一条记录
     */
    public int removeDeliveryAddress(int daId);
}
